package com.umanji.security.domain;

import java.io.Serializable;

import javax.persistence.Embeddable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.hibernate.annotations.NamedQuery;
import org.hibernate.annotations.SQLUpdate;

import com.umanji.building.domain.PublicOfficialBuildingAdmins;
import com.umanji.generic.entity.UUIDEntity;
import com.umanji.usedmarket.domain.UsedProducts;
import com.umanji.user.domain.Members;

// @Table(uniqueConstraints=@UniqueConstraint(columnNames="USERNAME"))

@Entity
public class Users implements Serializable {

	@Id
	private String username;

	private String password;

	private Boolean enabled;

	@OneToOne(mappedBy = "user")
	private Members member;

	public Users() {
		// TODO Auto-generated constructor stub
	}

    public Users(String username, String password, Boolean enabled) {
        this.username = username;
        this.password = password;
        this.enabled = Boolean.TRUE;
    }

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Boolean getEnabled() {
		return enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	public Members getMember() {
		return member;
	}

	public void setMember(Members member) {
		this.member = member;
	}

}
